package com.example.fruitdemo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Cart {
    List<GoodBuy> goodList;
    Integer number;
    Double totalprice;


    //构造方法外界Cart转化而来
    public Cart(Cart cart){
        this.goodList=cart.getGoodList();
        this.number=cart.getNumber();
        this.totalprice=cart.getTotalprice();
    }
}
